package org.ycx.doc.dao.model;

import java.io.Serializable;
import org.ycx.common.annotation.FormDesc;

@FormDesc(pk="verId")
public class DocProjectVersion implements Serializable {
    /** 版本编号 */
    @FormDesc(name="版本编号",maxLength=10,type=1)
    private Integer verId;

    /** 项目编号 */
    @FormDesc(name="项目编号",maxLength=10,type=1)
    private Integer appId;

    /** 项目版本号 */
    @FormDesc(name="项目版本号",maxLength=10,type=1)
    private Integer appVersion;

    /** 版本范围 */
    @FormDesc(name="版本范围",maxLength=10,type=1)
    private Integer verStart;

    /** 版本范围结束 */
    @FormDesc(name="版本范围结束",maxLength=10,type=1)
    private Integer verEnd;

    private static final long serialVersionUID = 1L;

    public Integer getVerId() {
        return verId;
    }

    public void setVerId(Integer verId) {
        this.verId = verId;
    }

    public Integer getAppId() {
        return appId;
    }

    public void setAppId(Integer appId) {
        this.appId = appId;
    }

    public Integer getAppVersion() {
        return appVersion;
    }

    public void setAppVersion(Integer appVersion) {
        this.appVersion = appVersion;
    }

    public Integer getVerStart() {
        return verStart;
    }

    public void setVerStart(Integer verStart) {
        this.verStart = verStart;
    }

    public Integer getVerEnd() {
        return verEnd;
    }

    public void setVerEnd(Integer verEnd) {
        this.verEnd = verEnd;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", verId=").append(verId);
        sb.append(", appId=").append(appId);
        sb.append(", appVersion=").append(appVersion);
        sb.append(", verStart=").append(verStart);
        sb.append(", verEnd=").append(verEnd);
        sb.append("]");
        return sb.toString();
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        DocProjectVersion other = (DocProjectVersion) that;
        return (this.getVerId() == null ? other.getVerId() == null : this.getVerId().equals(other.getVerId()))
            && (this.getAppId() == null ? other.getAppId() == null : this.getAppId().equals(other.getAppId()))
            && (this.getAppVersion() == null ? other.getAppVersion() == null : this.getAppVersion().equals(other.getAppVersion()))
            && (this.getVerStart() == null ? other.getVerStart() == null : this.getVerStart().equals(other.getVerStart()))
            && (this.getVerEnd() == null ? other.getVerEnd() == null : this.getVerEnd().equals(other.getVerEnd()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getVerId() == null) ? 0 : getVerId().hashCode());
        result = prime * result + ((getAppId() == null) ? 0 : getAppId().hashCode());
        result = prime * result + ((getAppVersion() == null) ? 0 : getAppVersion().hashCode());
        result = prime * result + ((getVerStart() == null) ? 0 : getVerStart().hashCode());
        result = prime * result + ((getVerEnd() == null) ? 0 : getVerEnd().hashCode());
        return result;
    }
}